﻿//vs
//#version 330 core 

layout(location = 0) in vec2 inPosition; //object space vertex position.

void main() {
    //get the clip space position from the object space position.
    gl_Position = vec4(inPosition.xy * 2 - 1.0, 0, 1);
}

//fs
//#version 330 core

uniform sampler2DRect tempTexture; //intermediate blending result.

layout(location = 0) out vec4 outColor;

void main() {
    //return the intermediate blending result.
    outColor = texture(tempTexture, gl_FragCoord.xy);
    // for occlusion query.
    if (outColor.a == 0) discard;
}
